jQuery(function(){
  var $ic = com.lolita.get.ic();
  jQuery(document).on('loli.player.close loli.player_admin.close',$ic,function(event){
    com.lolita.utils.remWidgetStyleSheet('player');
  }).on('loli.player.ajaxLoaded loli.player_admin.ajaxLoaded',$ic,function(event){
    com.lolita.display.setLoliDialogTitle();
    jQuery('.widget.player').height(parseInt($ic.height())-5);
    $ic.css('padding',0).css('margin',0);
    com.lolita.display.makeLoliTab('.widget.player .loli-tab');          
    com.lolita.display.makeAccordion('.widget.player .loli-accordion');
    jQuery('.logs',$ic).insertBefore('.ui-dialog-buttonset').show();
    jQuery('.edit-me').button({
      "icons" : {"primary" : "ui-icon-pencil"}
      ,"text" : false
    }).click(function(event){
      var id= this.href.split('#')[1];
      com.lolita.dialog.playerAdmin(id);
    });    
  });
  

  
});